{extend name="_layout/default" /}

{block name="header"}
<style>
    .film-source a{color: inherit;text-decoration: none;}
    a.mdui-text-truncate{max-width: 500px;display: block}
    .color-btfilm{color: #19b393}
    .btfilm-btn{background-color: #1ab394 !important;color: #fff !important;}
</style>

{/block}


{block name="main"}
<div class="mdui-container">
    <div class="mdui-center mdui-shadow-1" style="padding: 10px 35px 30px;">
        <div class="mdui-typo">
            <h3>{$film.title}</h3>
            <p>
                <small>
                    <b>来源：</b><abbr title="{$film.site_name}">{$film.site_name}</abbr>（<time>{$film.c_time}</time>）
                </small>
            </p>
        </div>
        <div class="mdui-typo">
            {$film.content|raw}
        </div>
        <div class="mdui-divider-inset" style="margin:10px 0;"></div>
        <div class="mdui-typo mdui-typo-caption-opacity">
            <p style="margin: 0">
                BTFILM声明：BTFILM提供的资源链接为网上搜集且注明来源，BTFILM未存储任何资源，不对内容负任何法律责任！若侵权，请联系BTFILM管理员删除链接！
            </p>
        </div>
    </div>

    <div class="mdui-m-t-1 mdui-center mdui-valign mdui-shadow-1 mdui-typo mdui-typo-caption-opacity" style="padding: 10px 35px;height: 30px;line-height: 30px;">
        <p style="margin: 0">
            BTFILM友情提示：如下载链接为百度网盘且需要密码，可前往原站查看密码。BT种子、磁力链接均可以通过115网盘、百度网盘、迅雷下载。
            <a href="{:url('/bridge')}?url={$film.gather_url|urlencode}" target="_blank" rel="nofollow">点此穿越至原站</a>
        </p>
    </div>

    {notempty name="playUrls"}
    <div class="mdui-table-fluid mdui-m-t-1">
        <table class="mdui-table mdui-table-hoverable">
            <thead>
            <tr class="">
                <th colspan="2">在线播放</th>
            </tr>
            </thead>
            <tbody>
            {volist name="playUrls" id="vo"}
            <tr>
                <td style="width: 70%">
                    <a class="mdui-text-truncate" href="{$vo.link}" title="{$film.title}在线播放" target="_blank">{$vo.link}</a>
                </td>
                <td style="text-align: right">
                    <a class="mdui-btn mdui-btn-raised mdui-ripple" href="{$vo.link}" target="_blank" style="background-color: #1ab394;color: #fff">立即播放</a>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
    </div>
    {/notempty}


    {notempty name="ciliUrls"}
    <div class="mdui-table-fluid mdui-m-t-1 film-source">
        <table class="mdui-table mdui-table-hoverable">
            <thead>
            <tr class="">
                <th colspan="2">磁力地址</th>
            </tr>
            </thead>
            <tbody>
            {volist name="ciliUrls" id="vo"}
            <tr>
                <td style="width: 70%">
                    <a class="mdui-text-truncate" href="{$vo.link}"  rel="nofollow" title="{$film.title} {$vo.title}">{$vo.link}</a>
                </td>
                <td style="text-align: right">
                    <a target="_blank" href="{$vo.link}" class="mdui-btn mdui-btn-raised mdui-ripple"  style="background-color: #1ab394;color: #fff">下载</a>
                    <button class="mdui-btn mdui-btn-raised mdui-ripple lx-download" data-clipboard-text="{$vo.link}" style="background-color: #1ab394;color: #fff">离线</button>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
    </div>
    {/notempty}


    {notempty name="otherUrls"}
    <div class="mdui-table-fluid mdui-m-t-1 film-source">
        <table class="mdui-table mdui-table-hoverable">
            <thead>
            <tr class="">
                <th colspan="2">网站资源地址</th>
            </tr>
            </thead>
            <tbody>
            {volist name="otherUrls" id="vo"}
            <tr>
                <td style="width: 70%">
                    <a class="mdui-text-truncate" href="{:url('/bridge')}?url={:urlencode($vo['link'])}" rel="nofollow" title="{$film.title}电影资源" target="_blank">{$vo.title|default=$vo['link']}</a>
                </td>
                <td style="text-align: right">
                    <a href="{:url('/bridge')}?url={:urlencode($vo['link'])}" rel="nofollow" title="{$film.title}电影资源" target="_blank" class="mdui-btn mdui-btn-raised mdui-ripple" style="background-color: #1ab394;color: #fff">前往</a>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
    </div>
    {/notempty}






</div>


<div class="mdui-dialog" id="lx-download-dialog" style="max-width: 520px">
    <div class="mdui-dialog-title">离线下载</div>
    <div class="mdui-dialog-content">
        磁力链接已复制，立即前往115云盘/百度网盘进行离线下载！
    </div>
    <div class="mdui-dialog-actions">
        <a href="https://115.com/?tab=offline&mode=wangpan" rel="nofollow" class="mdui-btn " target="_blank">115云盘快速通道</a>
        <a href="http://pan.baidu.com/disk/home?adapt=pc" rel="nofollow" class="mdui-btn" target="_blank">百度云盘快速通道</a>
    </div>
</div>
{/block}


{block name="footer"}
<script src="//cdnjs.loli.net/ajax/libs/mdui/0.4.2/js/mdui.min.js"></script>
<script src="/static/js/plugs/clipboard/clipboard.min.js"></script>
<script>
    let $$ = mdui.JQ;
    $$(function () {
        let clipboard = new Clipboard('.lx-download');
        clipboard.on('success', function(e) {
            e.clearSelection();
        });
        clipboard.on('error', function(e) {
            console.error('Trigger:', e.trigger);
        });

        $$('.lx-download').on('click', function (e) {
            let inst = new mdui.Dialog('#lx-download-dialog');
            inst.open();
        });
    });
    
</script>

{/block}